﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="OrderShip_Info.aspx.cs" Inherits="TimKen.Web.Admin.Order.OrderShip_Info" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
    <span class="action-span"><a href="Order_List.aspx">
        <%=GetLangString("Orders")%>
    </a></span>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <%=GetLangString("ShipInfo")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">

    <script language="javascript" type="text/javascript">
        $(function() {
            $(".orderItem").click(function() {
                var items = $(this).next();
                if (items.is(':visible')) {
                    items.slideUp();
                } else {
                    items.slideDown();
                }
            })
        })
    </script>

    <div class="list-div" style="margin-bottom: 5px">
        <table width="100%" cellpadding="3" cellspacing="1">
            <tr>
                <th colspan="4">
                    <%=GetLangString("OrderInfo")%>
                </th>
            </tr>
            <tr>
                <td width="15%">
                    <%=GetLangString("OrderNo")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labOrderNo" runat="server" Text=""></asp:Label>&nbsp;
                    <asp:HiddenField ID="labOrderID" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("OrderDate")%>：
                </td>
                <td width="34%">
                    <asp:Label ID="labCreateDate" runat="server" Text=""></asp:Label>&nbsp;
                </td>
                <td width="15%">
                    <%=GetLangString("ShippingType")%>：
                </td>
                <td>
                    <asp:Label ID="labTransType" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("LinkManID")%>：
                </td>
                <td>
                    <asp:Label ID="labContactPerson" runat="server" Text=""></asp:Label>&nbsp;
                </td>
                <td>
                    <%=GetLangString("LMName")%>：
                </td>
                <td>
                    <asp:Label ID="labLMName" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("Telephone")%>：
                </td>
                <td>
                    <asp:Label ID="labTelephone" runat="server" Text=""></asp:Label>&nbsp;
                </td>
                <td>
                    <%=GetLangString("Mobile")%>：
                </td>
                <td>
                    <asp:Label ID="labMobile" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("Email")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labEmail" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("Address")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labAddress" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("Remark")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labRemark" runat="server"></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("SalesPersonCode")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labSalesPersonCode" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("BillAddress")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labBillAddress" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("ShipArea")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labShipTo" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("ShipAddress")%>：
                </td>
                <td colspan="3">
                    <asp:Label ID="labShipAddress" runat="server"></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetLangString("OrderStatus")%>：
                </td>
                <td>
                    <asp:Label ID="labOrderStatus" runat="server" Text=""></asp:Label>&nbsp;
                </td>
                <td>
                    <%=GetLangString("ContractStatus")%>：
                </td>
                <td>
                    <asp:Label ID="labContractStatus" runat="server" Text=""></asp:Label>&nbsp;
                </td>
            </tr>
            <tr>
                <th colspan="4">
                    <%=GetLangString("ShipInfo")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <span style="font-weight: normal">
                        <%=GetLangString("ClickShowItemShips")%></span>
                </th>
            </tr>
        </table>
        <table class="grid">
            <asp:Repeater ID="repOrderShipItems" runat="server" OnItemDataBound="repOrderShipItems_ItemDataBound">
                <HeaderTemplate>
                    <tr>
                        <th>
                            <%#GetLangString("OrderItemNo")%>
                        </th>
                        <th>
                            <%#GetLangString("ItemCode")%>
                        </th>
                        <th>
                            <%#GetLangString("ShopNumber")%>
                        </th>
                        <th>
                            <%#GetLangString("SalesUnit")%>
                        </th>
                        <th>
                            <%#GetLangString("UnitPrice")%>
                        </th>
                        <th>
                            <%#GetLangString("RowPrice")%>
                        </th>
                        <th>
                            <%#GetLangString("RowTotalPrice")%>
                        </th>
                        <th>
                            <%#GetLangString("DeliveryedQty")%>
                        </th>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="orderItem">
                        <td align="right">
                            <%#Eval("ItemNo") %>
                        </td>
                        <td>
                            <a href="../Product/Product_Info.aspx?ProductID=<%#Eval("ProductID") %>">
                                <%#Eval("ItemCode") %></a>
                        </td>
                        <td align="right">
                            <%#Eval("Quantity") %>
                        </td>
                        <td>
                            <%#Eval("Unit") %>
                        </td>
                        <td align="right">
                            <%#Eval("FinalPrice") %>
                        </td>
                        <td align="right">
                            <%#Eval("BaseAmount") %>
                        </td>
                        <td align="right">
                            <%#Eval("TotalAmount") %>
                        </td>
                        <td align="right">
                            <%#Eval("DeliveryQty")%>
                        </td>
                    </tr>
                    <tr class="shipItems" style="display: none">
                        <td colspan="8">
                            <asp:Label ID="labNoItems" runat="server" Text='<%#GetLangString("NoItemShips") %>'
                                Visible="false"></asp:Label>
                            <table class="orderlisttable" width="300px">
                                <asp:Repeater ID="repShipItems" runat="server" DataSource='<%#GetShipItems(Eval("OrderItemID").ToString())%>'>
                                    <HeaderTemplate>
                                        <tr>
                                            <th>
                                                <%#GetLangString("ShipNo") %>
                                            </th>
                                            <th>
                                                <%#GetLangString("ShipItemNo") %>
                                            </th>
                                            <th>
                                                <%#GetLangString("ShipDate") %>
                                            </th>
                                            <th>
                                                <%#GetLangString("ShipQty") %>
                                            </th>
                                            <th>
                                                <%#GetLangString("ShipUnit") %>
                                            </th>
                                        </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%#Eval("ShipNo") %>
                                            </td>
                                            <td>
                                                <%#Eval("ItemNo") %>
                                            </td>
                                            <td>
                                                <%#Eval("ShipDate") %>
                                            </td>
                                            <td>
                                                <%#Eval("Quantity") %>
                                            </td>
                                            <td>
                                                <%#Eval("Unit") %>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
</asp:Content>
